

#include <stdio.h>
#include <time.h>

namespace	bocat	{
namespace	common	{


const char* now( void )
{
    static  char    szNow[ 64 ];
    
    time_t  t = time(NULL);
    struct tm*  ptm = localtime( &t );
    
    strftime( szNow, sizeof(szNow) - 1, "%Y-%m-%d %H:%M:%S", ptm );
    
    return  szNow;
}

const char* today( void )
{
    static  char    szToday[ 64 ];
    
    time_t  t = time(NULL);
    struct tm*  ptm = localtime( &t );
    
    strftime( szToday, sizeof(szToday) - 1, "%Y-%m-%d", ptm );
    
    return  szToday;
}


}	// namespace common
}	// namespace bocat

